package com.example.server.web.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //添加资源拦截路径                          访问路径
        registry.addResourceHandler("/photo/**").addResourceLocations("file:"+ SysConfig.getProfile());
        registry.addResourceHandler("/rdata/**").addResourceLocations("file" + SysConfig.getRfile());
    }
}
